1. Field of the Invention
The present invention relates to an electronic device in which information, the content of which is required to be held even in a power-off state, is stored in a flash memory, and more specifically to a DVD player and an electronic device in which a flash memory is cleared while the control delay is unnoticeable.
2. Description of the Prior Art
Some kinds of household electrical appliances need to hold data even in a power-off state, and DVD players can be cited as one of these kinds of household electrical appliances. That is, in a DVD player, it is necessary to hold the content of setup information such as the type of language to be reproduced, the type and/or appearance of subtitle, the method of audio output, and the password for parental lock, even in a power-off state. Thus, setup information is adapted to be stored in a nonvolatile element. However, it is necessary to provide an EEPROM separately if employed as a nonvolatile element, resulting in an increase of hardware. Hence, one block in a flash memory, in which control programs are stored, is allocated as a storage area for setup information to eliminate the use of an EEPROM (hereinafter referred to as first prior art).
The following technique has also been proposed (hereinafter referred to as second prior art). That is, the technique is arranged in such a manner that a storage device including a nonvolatile storage medium is found to be composed of logical blocks when viewed externally, while that the logical blocks are coordinated against physical blocks (blocks in the nonvolatile storage medium) internally. It is then disclosed that when erasing data, logical blocks are first cleared, while actual physical blocks are not required to be cleared immediately after the logical clearing but may be left uncleared to be cleared on another event. It is also disclosed that if only a small number of partial logical blocks are used among eight ones obtained by dividing one physical block, data in the partial logical blocks used is transferred to another physical block to subsequently clear the original physical block to avoid accumulating invalid data and thereby running out of free space (refer to Japanese Patent Laid-Open Publication No. 2003-58417 (paragraphs 0030 and 0036 through 0038) for example).
The following technique has further been proposed (hereinafter referred to as third prior art). That is, the technique is arranged in such a manner that when it is required to keep data in a mobile phone, the data to be kept is stored in a cache memory. Then, when the mobile phone is put into a standby mode, the data stored in the cache memory is transferred to a flash memory. It is also disclosed that the standby mode means that the mobile phone is neither under communication nor under key-in operation, and that no other processing is performed (refer to Japanese Patent Laid-Open Publication No. 2002-366432 (paragraphs 0015 through 0023) for example).
However, employing the first prior art suffers from the following problem. That is, when the content of setup information is updated, an appropriate block in the flash memory should be cleared to write the updated setup information therein. Meanwhile, clearing operation in flash memories is time-consuming, and therefore when setup information is updated, the speed of processing to be performed in parallel therewith is reduced, resulting in poor operational comfort.
Meanwhile, employing the second prior art allows the problem of the first prior art to be solved. However, in order to arrange that the storage device including the nonvolatile storage medium be found to be composed of logical blocks when viewed externally, it is necessary to coordinate the logical blocks against the physical blocks internally. Then, in order to make it possible to coordinate physical blocks of a flash memory against logical blocks, it is necessary to keep data indicating the correspondence of the logical blocks and the physical blocks even in a power-off state. Thus, a nonvolatile element for storing the correspondence is required. It is also required that this nonvolatile element does not take a lot of time to be cleared and is not a flash memory. Therefore, when applying the second prior art, the problem solved by the first prior art, that is, the problem of an unnecessary EEPROM emerges again.
Also, applying the third prior art to a DVD player, which uses a commercial power supply as its primary power supply, suffers from the following problem. That is, in the case of using a commercial power supply as the primary power supply, there may be a power failure before transferring data stored in the cache memory to the flash memory. Then, in the case of a power failure at such a time, setup information stored in the cache memory, that is, updated setup information is to be lost without being transferred to the flash memory.